<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/8/14
  Time: 9:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <table border="1" rules="all">
            <tr align="center" bgcolor="aqua">
                <td>工号</td>
                <td>讲师姓名</td>
                <td>性别</td>
                <td>年龄</td>
                <td>入职时间</td>
                <td>所带班级</td>
                <td colspan="5"><a><button>新增讲师</button></a></td>
            </tr>
            <c:forEach var="t" items="${list}" varStatus="a">
                <tr align="center" bgcolor="${a.index%2==0?'pink':''}">
                    <td>${t.tid}</td>
                    <td>${t.tname}</td>
                    <td>${t.gender}</td>
                    <td>${t.age}</td>
                    <td><f:formatDate value="${t.ttime}"  pattern="yyyy-MM-dd"/></td>
                    <td>
                        <c:forEach var="g" items="${t.gbs}">
                            &nbsp;&nbsp;<button onclick="ckbj('${g.gid}')">${g.gname}</button>&nbsp;&nbsp;
                        </c:forEach>
                    </td>
                    <td>
                        <a><button>删除</button></a>
                    </td>
                    <td>
                        <a><button>修改</button></a>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </center>
</body>
<script>
    function ckbj(gid) {
        window.open("<c:url value='/getGradeByGid.do?gid='/>"+gid,"","heigt=400px,width=600px")
    }

</script>
</html>
